-
Notifications
You must be signed in to change notification settings - Fork 662
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix sonic-installer and 'show version' command crash when database docker not running issue. #2183
Fix sonic-installer and 'show version' command crash when database docker not running issue. #2183
Conversation
Code change in this PR will validate and pass E2E test with this: sonic-net/sonic-buildimage#10909 |
…y_global_variable
Test with build image failed, not caused by change in this PR, seems fixed in master branch, will merge latest code and test again. |
Could you update PR description?
|
@qiluo-msft @liuh-80 Is there going to be a UT covering this fix ? |
1 similar comment
@qiluo-msft @liuh-80 Is there going to be a UT covering this fix ? |
@liuh-80 Please add unit test for this fix. |
Here is UT PR: sonic-net/sonic-mgmt#5722 |
#### What I did Fix pfcwd connect DB with exception issue: sonic-net/sonic-buildimage#11269 pfcwd implicit depends on InterfaceAliasConverter() to initialize DB config, however following PR change InterfaceAliasConverter() behavior to lazy initialize, then pfcwd failed when try connect to DB without initialize DB config: #2183 #### How I did it Load DB config in pfcwd. #### How to verify it Pass all UT.
@liuh-80 @qiluo-msft Could you please cherry pick this PR to 2205? |
…cker not running issue. (#2183) Fix sonic-installer and 'show version' command crash when database docker not running issue. #### Description Global variable utilies_common.cli.iface_alias_converter will connect to config DB when initialize itself. If database docker not running, the initialize code will crash. To fix this issue, change the variable to lazy initialize variable with lazy_object_proxy. #### Motivation and Context Fix this issue: sonic-net/sonic-buildimage#10434 #### How Has This Been Tested? Pass all UT and sonic-buildimage E2E test. #### Additional Information (Optional)
#### What I did Fix pfcwd connect DB with exception issue: sonic-net/sonic-buildimage#11269 pfcwd implicit depends on InterfaceAliasConverter() to initialize DB config, however following PR change InterfaceAliasConverter() behavior to lazy initialize, then pfcwd failed when try connect to DB without initialize DB config: sonic-net#2183 #### How I did it Load DB config in pfcwd. #### How to verify it Pass all UT.
#### What I did Fix pfcwd connect DB with exception issue: sonic-net/sonic-buildimage#11269 pfcwd implicit depends on InterfaceAliasConverter() to initialize DB config, however following PR change InterfaceAliasConverter() behavior to lazy initialize, then pfcwd failed when try connect to DB without initialize DB config: #2183 #### How I did it Load DB config in pfcwd. #### How to verify it Pass all UT. Co-authored-by: Hua Liu <[email protected]>
#### What I did Fix pfcwd connect DB with exception issue: sonic-net/sonic-buildimage#11269 pfcwd implicit depends on InterfaceAliasConverter() to initialize DB config, however following PR change InterfaceAliasConverter() behavior to lazy initialize, then pfcwd failed when try connect to DB without initialize DB config: sonic-net/sonic-utilities#2183 #### How I did it Load DB config in pfcwd. #### How to verify it Pass all UT.
Fix sonic-installer and 'show version' command crash when database docker not running issue.
Description
Motivation and Context
Fix this issue: sonic-net/sonic-buildimage#10434
How Has This Been Tested?
Additional Information (Optional)